Skip to content

fix(deps): PEN-4824 raise Jinja2, urllib3 and pytest pins - #2

Merged
rcidaleassumpo merged 1 commit into
developfrom
feature/renancidale/PEN-4824-dependabot-medium-low
Nov 12, 2026
Merged

rcidaleassumpo merged 1 commit into
developfrom
feature/renancidale/PEN-4824-dependabot-medium-low

Conversation

@rcidaleassumpo

Copy link
Copy Markdown

Linear: PEN-4824, PEN-4893

pytest 9 requires Python 3.10, so the Build workflow drops the 3.9 matrix entry; the Docker image already runs on Python 3.10. No code change needed.

Jinja2 3.1.2 -> 3.1.6 and urllib3 <2 -> >=2.5.0,<3 for the runtime
advisories, pytest 7.2.0 -> 9.0.3 for the test advisory. pytest 9
needs Python 3.10, so CI drops the 3.9 build; the image runs 3.10.
@rcidaleassumpo
rcidaleassumpo marked this pull request as ready for review November 11, 2026 16:10
@packy-review

packy-review Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Verdict: APPROVED

Findings

None.

Optional

  1. Old boto3 pins cannot share an environment with this package. The new urllib3 floor (>=2.5.0, <3) conflicts with botocore releases before 1.30, which need urllib3 below 1.27. A dry-run install of boto3==1.26.118, botocore==1.29.118 and urllib3>=2.5.0,<3 fails to resolve (ResolutionImpossible). This repo does not pin those packages, and the Dockerfile installs fresh, so no effect shows here. Reason it is optional: it needs a consumer that pins old botocore, and none is known.
  2. Implementer proof is missing from the PR body. The body states the version changes and the CVE list but attaches no test output. This run re-checked each claim (see ## Proof), so the gap is noted, not a required change.
  3. Python 3.9 coverage is gone from CI. This is the PR's stated choice. pytest 9.0.3 requires Python 3.10, and the Docker image already uses 3.10. Recorded so the choice stays visible.
  4. Stale header comment in .github/workflows/build.yml. The top comment still says "with a variety of Python versions", though the matrix now has one entry. The line is untouched by the diff, so it is not a finding.

Proof

Pinned head: 31cdd3c31dd427240038ea1d19625b5397e57924. Base: 5dbe678668e6eb748524c63d557625b7b047b602. The diff covers 3 files: setup.py, requirements-test.txt, .github/workflows/build.yml.

Method: a Python 3.10.11 environment per commit, with a fresh install at head and at base.

  1. Claim: Jinja2 moves to 3.1.6. Tried: fresh install at head; pip freeze. Result: Jinja2==3.1.6 at head, 3.1.2 at base.
  2. Claim: urllib3 >=2.5.0,<3 resolves to 2.8.0. Tried: fresh install at head. Result: urllib3==2.8.0. Base resolves 1.26.20.
  3. Claim: pytest 9.0.3, test-only. Tried: install at head; full suite. Result: pytest==9.0.3; 18 passed at head, 18 passed at base.
  4. Claim: CI lint still passes with the new pins. Tried: the CI hard flake8 selection (E9,F63,F7,F82) at head and base. Result: 0 errors at both.
  5. Claim: the functional tests pass, including external $ref resolution, which uses requests over urllib3. Tried: pytest tests/functional at head. Result: 6 passed.
  6. Claim: No code change needed. The Jinja2 upgrade leaves generated output unchanged. The suite does not reach CodeGenerator, so I ran it. Tried: api compile with tests/functional/api.yml (generator section: TypeScript) on each tests/openapi/*_source.yml (simple, complex, one_of, external_ref), at base and at head. Result: 13 generated .ts files in each. diff -r gives no output.
  7. Claim: Python 3.10 is the required minimum for pytest 9. Tried: read Requires-Python in the installed metadata. Result: pytest 9.0.3 says >=3.10. Also urllib3 2.8.0, requests 2.34.2 and botocore/boto3 1.44.0 say >=3.10.
  8. Claim: the Docker image runs Python 3.10. Tried: read Dockerfile. Result: FROM python:3.10-alpine. Source: Dockerfile in Packmatic/api-deploy.
  9. Claim: each CVE in the body is fixed at or below the new pin. Tried: gh api advisories?cve_id=... for all seven CVEs. Result: Jinja2 fixes are 3.1.3, 3.1.4, 3.1.5 (two), 3.1.6; urllib3 CVE-2025-50181 is fixed in 2.5.0; pytest CVE-2025-71176 is fixed in 9.0.3. Every pin is at or above its fix. Advisories: GHSA-h5c8-rqwp-cp95, GHSA-h75v-3vvj-5mfj, GHSA-gmj6-6f8f-6699, GHSA-q2x7-8rv6-6q7h, GHSA-cpwx-vrp4-4pq7, GHSA-pq67-6m6q-mj2v, GHSA-6w46-j5rx-g56g.
  10. Claim: the ticket's api-deploy scope is met. Tried: read PEN-4824. Result: its api-deploy rows are the same seven advisories (five Jinja2, pytest, urllib3). The diff clears all seven. No other dependency changed, which meets the "no unrelated upgrades" criterion.
  11. Consequence check: the CI matrix change. Tried: read the build.yml diff and the job steps. Result: one job, build (3.10), runs pip install ., pip install -r requirements-test.txt, flake8, and pytest. The check run on the head commit is success.
  12. Consumer probe (optional note only). Tried: pip install --dry-run boto3==1.26.118 botocore==1.29.118 'urllib3>=2.5.0,<3'. Result: ResolutionImpossible.

Not run: Python 3.9 install at head. Not verified at runtime: the api deploy path to AWS. Not checked: the PR's CVE exploitability, and any earlier local review of this PR.

@rcidaleassumpo
rcidaleassumpo requested a review from a team November 11, 2026 16:13
@rcidaleassumpo
rcidaleassumpo merged commit 381331a into develop Nov 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants